package com.netease.pris.provider;

import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import java.util.List;

public class ContentProviderEx extends ContentProvider
{
  private static final int A = 23;
  private static final int B = 24;
  private static final int C = 25;
  private static final int D = 26;
  private static final int E = 27;
  private static final int F = 28;
  private static final int G = 29;
  private static final int H = 30;
  private static final UriMatcher J = new UriMatcher(-1);
  static final String a = "ContentProviderEx";
  public static final int b = 10;
  public static final String c = "pris.db";
  private static final int d = 0;
  private static final int e = 1;
  private static final int f = 2;
  private static final int g = 3;
  private static final int h = 4;
  private static final int i = 5;
  private static final int j = 6;
  private static final int k = 7;
  private static final int l = 8;
  private static final int m = 9;
  private static final int n = 10;
  private static final int o = 11;
  private static final int p = 12;
  private static final int q = 13;
  private static final int r = 14;
  private static final int s = 15;
  private static final int t = 16;
  private static final int u = 17;
  private static final int v = 18;
  private static final int w = 19;
  private static final int x = 20;
  private static final int y = 21;
  private static final int z = 22;
  private ac I;

  static
  {
    J.addURI("pris", "rawquery", 0);
    J.addURI("pris", "account", 1);
    J.addURI("pris", "account/#", 2);
    J.addURI("pris", "favorite", 3);
    J.addURI("pris", "favorite/#", 4);
    J.addURI("pris", "subscribe", 5);
    J.addURI("pris", "subscribe/#", 6);
    J.addURI("pris", "article_status", 7);
    J.addURI("pris", "article_status/#", 8);
    J.addURI("pris", "cachetabable", 9);
    J.addURI("pris", "cachetabable/#", 10);
    J.addURI("pris", "config", 13);
    J.addURI("pris", "config/#", 14);
    J.addURI("pris", "search", 11);
    J.addURI("pris", "search/#", 12);
    J.addURI("pris", "conver", 15);
    J.addURI("pris", "conver/#", 16);
    J.addURI("pris", "temp_search", 17);
    J.addURI("pris", "temp_search/#", 18);
    J.addURI("pris", "temp_article", 19);
    J.addURI("pris", "temp_article/#", 20);
    J.addURI("pris", "temp_comment", 21);
    J.addURI("pris", "temp_comment/#", 22);
    J.addURI("pris", "temp_subcribe", 23);
    J.addURI("pris", "temp_subcribe/#", 24);
    J.addURI("pris", "weibo_account", 25);
    J.addURI("pris", "weibo_account/#", 26);
    J.addURI("pris", "offline", 27);
    J.addURI("pris", "offline/#", 28);
    J.addURI("pris", "fonts", 29);
    J.addURI("pris", "fonts/#", 30);
  }

  private static String a(Uri paramUri, String paramString)
  {
    if (!TextUtils.isEmpty(paramString))
      paramString = paramString + " AND";
    String str = "_id = " + (String)paramUri.getPathSegments().get(1);
    if (paramString == null);
    while (true)
    {
      return str;
      str = paramString + str;
    }
  }

  public int delete(Uri paramUri, String paramString, String[] paramArrayOfString)
  {
    SQLiteDatabase localSQLiteDatabase = this.I.getWritableDatabase();
    int i1;
    switch (J.match(paramUri))
    {
    default:
      throw new UnsupportedOperationException("Cannot delete that URI: " + paramUri);
    case 2:
      paramString = a(paramUri, paramString);
    case 1:
      i1 = localSQLiteDatabase.delete("account", paramString, paramArrayOfString);
    case 4:
    case 3:
    case 6:
    case 5:
    case 8:
    case 7:
    case 10:
    case 9:
    case 12:
    case 11:
    case 14:
    case 13:
    case 16:
    case 15:
    case 18:
    case 17:
    case 20:
    case 19:
    case 22:
    case 21:
    case 24:
    case 23:
    case 26:
    case 25:
    case 28:
    case 27:
    case 30:
    case 29:
    }
    while (true)
    {
      if (i1 > 0)
        getContext().getContentResolver().notifyChange(paramUri, null);
      return i1;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("favorite", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("subscribe", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("article_status", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("cachetabable", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("search", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("config", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("conver", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("temp_search", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("temp_article", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("temp_comment", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("temp_subcribe", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("weibo_account", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("offline", paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      i1 = localSQLiteDatabase.delete("fonts", paramString, paramArrayOfString);
    }
  }

  public String getType(Uri paramUri)
  {
    return null;
  }

  public Uri insert(Uri paramUri, ContentValues paramContentValues)
  {
    Uri localUri1 = null;
    SQLiteDatabase localSQLiteDatabase = this.I.getWritableDatabase();
    long l1;
    Uri localUri2;
    switch (J.match(paramUri))
    {
    case 2:
    case 4:
    case 6:
    case 8:
    case 10:
    case 12:
    case 14:
    case 16:
    case 18:
    case 20:
    case 22:
    case 24:
    case 26:
    case 28:
    default:
      throw new UnsupportedOperationException("Cannot insert that URI: " + paramUri);
    case 1:
      l1 = localSQLiteDatabase.insert("account", null, paramContentValues);
      localUri2 = q.j;
    case 3:
    case 5:
    case 7:
    case 9:
    case 11:
    case 13:
    case 15:
    case 17:
    case 19:
    case 21:
    case 23:
    case 25:
    case 27:
    case 29:
    }
    while (true)
    {
      if (l1 > 0L)
      {
        getContext().getContentResolver().notifyChange(paramUri, null);
        localUri1 = ContentUris.withAppendedId(localUri2, l1);
      }
      return localUri1;
      l1 = localSQLiteDatabase.insert("favorite", null, paramContentValues);
      localUri2 = p.j;
      continue;
      l1 = localSQLiteDatabase.insert("subscribe", null, paramContentValues);
      localUri2 = m.k;
      continue;
      l1 = localSQLiteDatabase.insert("article_status", null, paramContentValues);
      localUri2 = z.g;
      continue;
      if (!paramContentValues.containsKey("timestamp"))
        paramContentValues.put("timestamp", Long.valueOf(System.currentTimeMillis()));
      l1 = localSQLiteDatabase.insert("cachetabable", null, paramContentValues);
      localUri2 = a.b;
      continue;
      l1 = localSQLiteDatabase.insert("search", null, paramContentValues);
      localUri2 = k.b;
      continue;
      l1 = localSQLiteDatabase.insert("config", null, paramContentValues);
      localUri2 = ae.f;
      continue;
      l1 = localSQLiteDatabase.insert("conver", null, paramContentValues);
      localUri2 = i.k;
      continue;
      l1 = localSQLiteDatabase.insert("temp_search", null, paramContentValues);
      localUri2 = ab.b;
      continue;
      l1 = localSQLiteDatabase.insert("temp_article", null, paramContentValues);
      localUri2 = w.k;
      continue;
      l1 = localSQLiteDatabase.insert("temp_comment", null, paramContentValues);
      localUri2 = u.j;
      continue;
      l1 = localSQLiteDatabase.insert("temp_subcribe", null, paramContentValues);
      localUri2 = v.l;
      continue;
      l1 = localSQLiteDatabase.insert("weibo_account", null, paramContentValues);
      localUri2 = af.k;
      continue;
      l1 = localSQLiteDatabase.insert("offline", null, paramContentValues);
      localUri2 = e.b;
      continue;
      l1 = localSQLiteDatabase.insert("fonts", null, paramContentValues);
      localUri2 = r.i;
    }
  }

  public boolean onCreate()
  {
    try
    {
      this.I = ac.a(getContext());
      this.I.getWritableDatabase();
      return true;
    }
    catch (SQLiteException localSQLiteException)
    {
      while (true)
      {
        localSQLiteException.printStackTrace();
        if (this.I == null)
          continue;
        this.I.close();
        this.I = null;
      }
    }
  }

  public Cursor query(Uri paramUri, String[] paramArrayOfString1, String paramString1, String[] paramArrayOfString2, String paramString2)
  {
    SQLiteQueryBuilder localSQLiteQueryBuilder = new SQLiteQueryBuilder();
    int i1;
    String str;
    SQLiteDatabase localSQLiteDatabase;
    switch (J.match(paramUri))
    {
    default:
      throw new UnsupportedOperationException("Cannot query that URI: " + paramUri);
    case 0:
      i1 = 1;
      str = paramString1;
      localSQLiteDatabase = this.I.getWritableDatabase();
      if (i1 == 0)
        break;
    case 2:
    case 1:
    case 4:
    case 3:
    case 6:
    case 5:
    case 8:
    case 7:
    case 10:
    case 9:
    case 12:
    case 11:
    case 14:
    case 13:
    case 16:
    case 15:
    case 18:
    case 17:
    case 20:
    case 19:
    case 22:
    case 21:
    case 24:
    case 23:
    case 26:
    case 25:
    case 28:
    case 27:
    case 30:
    case 29:
    }
    for (Cursor localCursor = localSQLiteDatabase.rawQuery(str, paramArrayOfString2); ; localCursor = localSQLiteQueryBuilder.query(localSQLiteDatabase, paramArrayOfString1, str, paramArrayOfString2, null, null, paramString2))
    {
      localCursor.setNotificationUri(getContext().getContentResolver(), paramUri);
      return localCursor;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("account");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("favorite");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("subscribe");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("article_status");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("cachetabable");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("search");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("config");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("conver");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("temp_search");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("temp_article");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("temp_comment");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("temp_subcribe");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("weibo_account");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("offline");
      i1 = 0;
      str = paramString1;
      break;
      paramString1 = a(paramUri, paramString1);
      localSQLiteQueryBuilder.setTables("fonts");
      i1 = 0;
      str = paramString1;
      break;
    }
  }

  public int update(Uri paramUri, ContentValues paramContentValues, String paramString, String[] paramArrayOfString)
  {
    SQLiteDatabase localSQLiteDatabase = this.I.getWritableDatabase();
    switch (J.match(paramUri))
    {
    default:
      throw new UnsupportedOperationException("Cannot update that URI: " + paramUri);
    case 2:
      paramString = a(paramUri, paramString);
    case 1:
      localSQLiteDatabase.update("account", paramContentValues, paramString, paramArrayOfString);
    case 4:
    case 3:
    case 6:
    case 5:
    case 8:
    case 7:
    case 10:
    case 9:
    case 12:
    case 11:
    case 14:
    case 13:
    case 16:
    case 15:
    case 18:
    case 17:
    case 20:
    case 19:
    case 22:
    case 21:
    case 24:
    case 23:
    case 26:
    case 25:
    case 28:
    case 27:
    case 30:
    case 29:
    }
    while (true)
    {
      return 0;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("favorite", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("subscribe", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("article_status", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      if (!paramContentValues.containsKey("timestamp"))
        paramContentValues.put("timestamp", Long.valueOf(System.currentTimeMillis()));
      localSQLiteDatabase.update("cachetabable", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("search", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("config", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("conver", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("temp_search", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("temp_article", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("temp_comment", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("temp_subcribe", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("weibo_account", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("offline", paramContentValues, paramString, paramArrayOfString);
      continue;
      paramString = a(paramUri, paramString);
      localSQLiteDatabase.update("fonts", paramContentValues, paramString, paramArrayOfString);
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.provider.ContentProviderEx
 * JD-Core Version:    0.6.0
 */